Java EE Applications on Oracle Java Cloud:: Develop, Deploy, Monitor, and Manage Your Java Cloud Applications by Harshad Oak
Author:Harshad Oak [Oak, Harshad]
Language: eng
Format: epub
Tags: Computers, Web, Web Programming, Certification, Databases, Java, JavaScript
ISBN: 9780071817165
Google: W1lzAwAAQBAJ
Publisher: McGraw Hill Professional
Published: 2014-09-04T21:00:00+00:00
JSP Comments
Comments are used throughout programming as a best practice to communicate your ideas or as an approach to addressing a particular issue within the code. In JSP, you have three choices for how you want to use comments—JSP Comment, Java Comment, and HTML Comment (see Listing 5-6).
Listing 5-6: JSP Comments
The difference between these three is that the JSP Comment appears only in the JSP and not even in the translated Servlet code. The Java Comment appears in the JSP and the Servlet code, whereas HTML Comment is the only one that will make it to the response (usually HTML) and can be viewed if the user selects View Source in the web browser.
None of the styles of comments will affect the output of the JSP page, but understanding where the comments appear is vital for you to be able to use the right kind of comment at the right place. If the comment is meant only for the JSP developers, you should use the <%-- JSP Comment --%> style of commenting. The <!-- HTML Comment --> style should be used only if you want the comment to appear in the HTML response. Although it’s true that the <!-- HTML Comment --> comments are visible only if someone checks the source in the browser, you would still be moving a lot of unnecessary data to the client and also reveal developer-specific information.
The <% //Java Comment %> comment type is the one that Java developers are comfortable with and often end up using. However, it has no real benefit over the JSP Comment, because including the comment in the translated Servlet usually does not serve much purpose. So in most cases, JSP Comment will be the one to use.
In this section, we looked at the working of the JSP, the basic syntax, and usage of directives, scriptlets, expressions, and comments. Let’s now look at how you can use tags to make your JSPs fast to build and easy to maintain.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Exploring Deepfakes by Bryan Lyon and Matt Tora(7730)
Robo-Advisor with Python by Aki Ranin(7626)
Offensive Shellcode from Scratch by Rishalin Pillay(6106)
Microsoft 365 and SharePoint Online Cookbook by Gaurav Mahajan Sudeep Ghatak Nate Chamberlain Scott Brewster(5025)
Ego Is the Enemy by Ryan Holiday(4958)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4438)
Python for ArcGIS Pro by Silas Toms Bill Parker(4184)
Elevating React Web Development with Gatsby by Samuel Larsen-Disney(3890)
Machine Learning at Scale with H2O by Gregory Keys | David Whiting(3627)
Learning C# by Developing Games with Unity 2021 by Harrison Ferrone(3285)
Speed Up Your Python with Rust by Maxwell Flitton(3231)
Liar's Poker by Michael Lewis(3225)
OPNsense Beginner to Professional by Julio Cesar Bueno de Camargo(3195)
Extreme DAX by Michiel Rozema & Henk Vlootman(3172)
Agile Security Operations by Hinne Hettema(3124)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic and Jasmin Redzepagic(3109)
Essential Cryptography for JavaScript Developers by Alessandro Segala(3083)
Cryptography Algorithms by Massimo Bertaccini(3002)
AI-Powered Commerce by Andy Pandharikar & Frederik Bussler(2983)
